3.2.45 \(\int x \sqrt {a+a \cos (c+d x)} \, dx\) [145]

Optimal. Leaf size=53 \[ \frac {4 \sqrt {a+a \cos (c+d x)}}{d^2}+\frac {2 x \sqrt {a+a \cos (c+d x)} \tan \left (\frac {c}{2}+\frac {d x}{2}\right )}{d} \]

[Out]

4*(a+a*cos(d*x+c))^(1/2)/d^2+2*x*(a+a*cos(d*x+c))^(1/2)*tan(1/2*d*x+1/2*c)/d

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {3400, 3377, 2718} \begin {gather*} \frac {4 \sqrt {a \cos (c+d x)+a}}{d^2}+\frac {2 x \tan \left (\frac {c}{2}+\frac {d x}{2}\right ) \sqrt {a \cos (c+d x)+a}}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x*Sqrt[a + a*Cos[c + d*x]],x]

[Out]

(4*Sqrt[a + a*Cos[c + d*x]])/d^2 + (2*x*Sqrt[a + a*Cos[c + d*x]]*Tan[c/2 + (d*x)/2])/d

Rule 2718

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3377

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(-(c + d*x)^m)*(Cos[e + f*x]/f), x]
+ Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 3400

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[(2*a)^IntPart[n]
*((a + b*Sin[e + f*x])^FracPart[n]/Sin[e/2 + a*(Pi/(4*b)) + f*(x/2)]^(2*FracPart[n])), Int[(c + d*x)^m*Sin[e/2
 + a*(Pi/(4*b)) + f*(x/2)]^(2*n), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[a^2 - b^2, 0] && IntegerQ[n
 + 1/2] && (GtQ[n, 0] || IGtQ[m, 0])

Rubi steps

\begin {align*} \int x \sqrt {a+a \cos (c+d x)} \, dx &=\left (\sqrt {a+a \cos (c+d x)} \csc \left (\frac {1}{2} \left (c+\frac {\pi }{2}\right )+\frac {\pi }{4}+\frac {d x}{2}\right )\right ) \int x \sin \left (\frac {1}{2} \left (c+\frac {\pi }{2}\right )+\frac {\pi }{4}+\frac {d x}{2}\right ) \, dx\\ &=\frac {2 x \sqrt {a+a \cos (c+d x)} \tan \left (\frac {c}{2}+\frac {d x}{2}\right )}{d}-\frac {\left (2 \sqrt {a+a \cos (c+d x)} \csc \left (\frac {1}{2} \left (c+\frac {\pi }{2}\right )+\frac {\pi }{4}+\frac {d x}{2}\right )\right ) \int \sin \left (\frac {c}{2}+\frac {d x}{2}\right ) \, dx}{d}\\ &=\frac {4 \sqrt {a+a \cos (c+d x)}}{d^2}+\frac {2 x \sqrt {a+a \cos (c+d x)} \tan \left (\frac {c}{2}+\frac {d x}{2}\right )}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.08, size = 34, normalized size = 0.64 \begin {gather*} \frac {2 \sqrt {a (1+\cos (c+d x))} \left (2+d x \tan \left (\frac {1}{2} (c+d x)\right )\right )}{d^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x*Sqrt[a + a*Cos[c + d*x]],x]

[Out]

(2*Sqrt[a*(1 + Cos[c + d*x])]*(2 + d*x*Tan[(c + d*x)/2]))/d^2

________________________________________________________________________________________

Maple [C] Result contains complex when optimal does not.
time = 0.05, size = 80, normalized size = 1.51

method result size
risch \(-\frac {i \sqrt {2}\, \sqrt {a \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{2} {\mathrm e}^{-i \left (d x +c \right )}}\, \left (d x \,{\mathrm e}^{i \left (d x +c \right )}+2 i {\mathrm e}^{i \left (d x +c \right )}-d x +2 i\right )}{\left ({\mathrm e}^{i \left (d x +c \right )}+1\right ) d^{2}}\) \(80\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a+a*cos(d*x+c))^(1/2),x,method=_RETURNVERBOSE)

[Out]

-I*2^(1/2)*(a*(exp(I*(d*x+c))+1)^2*exp(-I*(d*x+c)))^(1/2)/(exp(I*(d*x+c))+1)*(d*x*exp(I*(d*x+c))+2*I*exp(I*(d*
x+c))-d*x+2*I)/d^2

________________________________________________________________________________________

Maxima [A]
time = 0.54, size = 61, normalized size = 1.15 \begin {gather*} -\frac {2 \, {\left (\sqrt {2} \sqrt {a} c \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - {\left (\sqrt {2} {\left (d x + c\right )} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2 \, \sqrt {2} \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} \sqrt {a}\right )}}{d^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+a*cos(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

-2*(sqrt(2)*sqrt(a)*c*sin(1/2*d*x + 1/2*c) - (sqrt(2)*(d*x + c)*sin(1/2*d*x + 1/2*c) + 2*sqrt(2)*cos(1/2*d*x +
 1/2*c))*sqrt(a))/d^2

________________________________________________________________________________________

Fricas [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+a*cos(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

Exception raised: TypeError >>  Error detected within library code:   integrate: implementation incomplete (ha
s polynomial part)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x \sqrt {a \left (\cos {\left (c + d x \right )} + 1\right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+a*cos(d*x+c))**(1/2),x)

[Out]

Integral(x*sqrt(a*(cos(c + d*x) + 1)), x)

________________________________________________________________________________________

Giac [A]
time = 0.49, size = 57, normalized size = 1.08 \begin {gather*} 2 \, \sqrt {2} {\left (\frac {x \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{d} + \frac {2 \, \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}{d^{2}}\right )} \sqrt {a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+a*cos(d*x+c))^(1/2),x, algorithm="giac")

[Out]

2*sqrt(2)*(x*sgn(cos(1/2*d*x + 1/2*c))*sin(1/2*d*x + 1/2*c)/d + 2*cos(1/2*d*x + 1/2*c)*sgn(cos(1/2*d*x + 1/2*c
))/d^2)*sqrt(a)

________________________________________________________________________________________

Mupad [B]
time = 0.21, size = 46, normalized size = 0.87 \begin {gather*} \frac {2\,\sqrt {a\,\left (\cos \left (c+d\,x\right )+1\right )}\,\left (2\,\cos \left (c+d\,x\right )+d\,x\,\sin \left (c+d\,x\right )+2\right )}{d^2\,\left (\cos \left (c+d\,x\right )+1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a + a*cos(c + d*x))^(1/2),x)

[Out]

(2*(a*(cos(c + d*x) + 1))^(1/2)*(2*cos(c + d*x) + d*x*sin(c + d*x) + 2))/(d^2*(cos(c + d*x) + 1))

________________________________________________________________________________________